package com.crane.oss.sports;

import com.crane.common.framework.http.apache.HttpClientUtils;
import com.crane.common.framework.http.apache.HttpResult;
import com.crane.oss.xunfei.req.*;
import com.crane.oss.xunfei.resp.*;
import com.fasterxml.jackson.core.type.TypeReference;
import org.apache.http.Header;
import org.apache.http.message.BasicHeader;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

@Component
public class XunFeiTeachTestApiService extends XunFeiApiService {
    /**
     * 体测周期总体情况
     * todo
     * 缺少不传项目id的总体情况。传项目id缺少字段，
     */
    public ApiSingleResponse<PhysicalTestOverallResp> getPhysicalTestOverall(QueryPhysicalTestOverallReq request, String sid, String did, String uid){
        Map<String, String> params = getStringStringMap(request, sid, did, uid);
        HttpResult httpResult=HttpClientUtils.get(xunFeiAppConfig.getUrl()+"/physical/test/overall",params);
        if(httpResult.isSuccess()){
            ApiSingleResponse<PhysicalTestOverallResp> response=httpResult.getDataObjectByJson(new TypeReference<ApiSingleResponse<PhysicalTestOverallResp>>(){});
            return response;
        }
        return ApiSingleResponse.buildFailure();
    }

    /**
     * 学生体测成绩记录查询
     */
    public ApiListResponse<PhysicalTestStudentResp> getPhysicalTestStudent(QueryPhysicalTestStudentReq request, String sid, String did, String uid){
        Map<String, String> params = getStringStringMap(request, sid, did, uid);
        HttpResult httpResult=HttpClientUtils.get(xunFeiAppConfig.getUrl()+"/physical/test/history",params);
        if(httpResult.isSuccess()){
            ApiListResponse<PhysicalTestStudentResp> response=httpResult.getDataObjectByJson(new TypeReference<ApiListResponse<PhysicalTestStudentResp>>(){});
            return response;
        }
        return ApiListResponse.buildFailure();
    }


    /**
     * 成绩分析全部总体情况
     */
    public ApiSingleResponse<PhysicalTestAllOverallResp> getPhysicalTestAllOverall(QueryPhysicalTestAllOverallReq request, String sid, String did, String uid){
        Map<String, String> params = getStringStringMap(request, sid, did, uid);
        HttpResult httpResult=HttpClientUtils.get(xunFeiAppConfig.getUrl()+"/physical/test/all/overall",params);
        if(httpResult.isSuccess()){
            ApiSingleResponse<PhysicalTestAllOverallResp> response=httpResult.getDataObjectByJson(new TypeReference<ApiSingleResponse<PhysicalTestAllOverallResp>>(){});
            return response;
        }
        return ApiSingleResponse.buildFailure();
    }


    /**
     * 成绩分析总体情况附加分详情
     */
    public ApiListResponse<PhysicalTestAllAdditionResp> getPhysicalTestAllAddition(QueryPhysicalTestAllAdditionReq request, String sid, String did, String uid){
        Map<String, String> params = getStringStringMap(request, sid, did, uid);
        HttpResult httpResult=HttpClientUtils.get(xunFeiAppConfig.getUrl()+"/physical/test/all/addition",params);
        if(httpResult.isSuccess()){
            ApiListResponse<PhysicalTestAllAdditionResp> response=httpResult.getDataObjectByJson(new TypeReference<ApiListResponse<PhysicalTestAllAdditionResp>>(){});
            return response;
        }
        return ApiListResponse.buildFailure();
    }

    /**
     *  成绩分析各项目成绩情况
     */
    public ApiListResponse<PhysicalTestAllDetailResp> getPhysicalTestAllDetail(QueryPhysicalTestAllDetailReq request, String sid, String did, String uid){
        Map<String, String> params = getStringStringMap(request, sid, did, uid);
        HttpResult httpResult=HttpClientUtils.get(xunFeiAppConfig.getUrl()+"/physical/test/all/detail",params);
        if(httpResult.isSuccess()){
            ApiListResponse<PhysicalTestAllDetailResp> response=httpResult.getDataObjectByJson(new TypeReference<ApiListResponse<PhysicalTestAllDetailResp>>(){});
            return response;
        }
        return ApiListResponse.buildFailure();
    }

    /**
     *   成绩分析全部情况
     */
    public ApiListResponse<PhysicalTestAllAnalyzeResp> getPhysicalTestAllAnalyze(QueryPhysicalTestAllAnalyzeReq request, String sid, String did, String uid){
        Map<String, String> params = getStringStringMap(request, sid, did, uid);
        HttpResult httpResult=HttpClientUtils.get(xunFeiAppConfig.getUrl()+"/physical/test/all/analyze",params);
        if(httpResult.isSuccess()){
            ApiListResponse<PhysicalTestAllAnalyzeResp> response=httpResult.getDataObjectByJson(new TypeReference<ApiListResponse<PhysicalTestAllAnalyzeResp>>(){});
            return response;
        }
        return ApiListResponse.buildFailure();
    }

    /**
     *   成绩分析单项总体情况
     */
    public ApiSingleResponse<PhysicalTestSingleOverallResp> getPhysicalTestSingleOverall(QueryPhysicalTestSingleOverallReq request, String sid, String did, String uid){
        Map<String, String> params = getStringStringMap(request, sid, did, uid);
        HttpResult httpResult=HttpClientUtils.get(xunFeiAppConfig.getUrl()+"/physical/test/single/overall",params);
        if(httpResult.isSuccess()){
            ApiSingleResponse<PhysicalTestSingleOverallResp> response=httpResult.getDataObjectByJson(new TypeReference<ApiSingleResponse<PhysicalTestSingleOverallResp>>(){});
            return response;
        }
        return ApiSingleResponse.buildFailure();
    }


    /**
     *    成绩分析单项全部情况（等级、成绩、分数）
     */
    public ApiListResponse<PhysicalTestSingleAnalyzeResp> getPhysicalTestSingleAnalyze(QueryPhysicalTestSingleOverallReq request, String sid, String did, String uid){
        Map<String, String> params = getStringStringMap(request, sid, did, uid);
        HttpResult httpResult=HttpClientUtils.get(xunFeiAppConfig.getUrl()+"/physical/test/single/analyze",params);
        if(httpResult.isSuccess()){
            ApiListResponse<PhysicalTestSingleAnalyzeResp> response=httpResult.getDataObjectByJson(new TypeReference<ApiListResponse<PhysicalTestSingleAnalyzeResp>>(){});
            return response;
        }
        return ApiListResponse.buildFailure();
    }

    /**
     *    成绩分析单项学生列表
     */
    public ApiListResponse<PhysicalTestSingleDetailResp> getPhysicalTestSingleDetail(QueryPhysicalTestSingleDetailReq request, String sid, String did, String uid){
        Map<String, String> params = getStringStringMap(request, sid, did, uid);
        HttpResult httpResult=HttpClientUtils.get(xunFeiAppConfig.getUrl()+"/physical/test/single/detail",params);
        if(httpResult.isSuccess()){
            ApiListResponse<PhysicalTestSingleDetailResp> response=httpResult.getDataObjectByJson(new TypeReference<ApiListResponse<PhysicalTestSingleDetailResp>>(){});
            return response;
        }
        return ApiListResponse.buildFailure();
    }


    /**
     *   成绩分析单项个人详情
     */
    public ApiSingleResponse<PhysicalTestSingleUserDetailResp> getPhysicalTestSingleUserDetail(QueryPhysicalTestSingleUserDetailReq request, String sid, String did, String uid){
        Map<String, String> params = getStringStringMap(request, sid, did, uid);
        HttpResult httpResult=HttpClientUtils.get(xunFeiAppConfig.getUrl()+"/physical/test/single/user/detail",params);
        if(httpResult.isSuccess()){
            ApiSingleResponse<PhysicalTestSingleUserDetailResp> response=httpResult.getDataObjectByJson(new TypeReference<ApiSingleResponse<PhysicalTestSingleUserDetailResp>>(){});
            return response;
        }
        return ApiSingleResponse.buildFailure();
    }

    /**
     *   成绩管理总分
     */
    public ApiListResponse<PhysicalTestAllResultManagerResp> getPhysicalTestAllResultManager(QueryPhysicalTestAllResultManagerReq request, String sid, String did, String uid){
        Map<String, String> params = getStringStringMap(request, sid, did, uid);
        HttpResult httpResult=HttpClientUtils.get(xunFeiAppConfig.getUrl()+"/physical/test/all/result/manage",params);
        if(httpResult.isSuccess()){
            ApiListResponse<PhysicalTestAllResultManagerResp> response=httpResult.getDataObjectByJson(new TypeReference<ApiListResponse<PhysicalTestAllResultManagerResp>>(){});
            return response;
        }
        return ApiListResponse.buildFailure();
    }

    /**
     *  成绩管理总分个人详情
     */
    public ApiSingleResponse<PhysicalTestAllResultDetailResp> getPhysicalTestAllResultDetail(QueryPhysicalTestAllResultDetailReq request, String sid, String did, String uid){
        Map<String, String> params = getStringStringMap(request, sid, did, uid);
        HttpResult httpResult=HttpClientUtils.get(xunFeiAppConfig.getUrl()+"/physical/test/all/result/detail",params);
        if(httpResult.isSuccess()){
            ApiSingleResponse<PhysicalTestAllResultDetailResp> response=httpResult.getDataObjectByJson(new TypeReference<ApiSingleResponse<PhysicalTestAllResultDetailResp>>(){});
            return response;
        }
        return ApiSingleResponse.buildFailure();
    }


    /**
     *   成绩管理单项
     */
    public ApiListResponse<PhysicalTestAllResultManagerResp> getPhysicalTestSingleResultManager(QueryPhysicalTestAllResultManagerReq request, String sid, String did, String uid){
        Map<String, String> params = getStringStringMap(request, sid, did, uid);
        HttpResult httpResult=HttpClientUtils.get(xunFeiAppConfig.getUrl()+"/physical/test/single/result/manage",params);
        if(httpResult.isSuccess()){
            ApiListResponse<PhysicalTestAllResultManagerResp> response=httpResult.getDataObjectByJson(new TypeReference<ApiListResponse<PhysicalTestAllResultManagerResp>>(){});
            return response;
        }
        return ApiListResponse.buildFailure();
    }

    /**
     *  成绩管理成绩记录
     */
    public ApiSingleResponse<PhysicalTestSingleResultHistoryResp> getPhysicalTestSingleResultHistory(QueryPhysicalTestSingleResultHistoryReq request, String sid, String did, String uid){
        Map<String, String> params = getStringStringMap(request, sid, did, uid);
        HttpResult httpResult=HttpClientUtils.get(xunFeiAppConfig.getUrl()+"/physical/test/single/result/history",params);
        if(httpResult.isSuccess()){
            ApiSingleResponse<PhysicalTestSingleResultHistoryResp> response=httpResult.getDataObjectByJson(new TypeReference<ApiSingleResponse<PhysicalTestSingleResultHistoryResp>>(){});
            return response;
        }
        return ApiSingleResponse.buildFailure();
    }

    /**
     *  成绩管理成绩删除
     */
    public ApiSingleResponse<Boolean> deletePhysicalTestSingleResultHistory(QueryPhysicalTestSingleResultHistoryReq request, String sid, String did, String uid){
        Map<String, String> params = getStringStringMap(request, sid, did, uid);
        HttpResult httpResult=HttpClientUtils.post(xunFeiAppConfig.getUrl()+"/physical/test/single/result/history/delete",params);
        if(httpResult.isSuccess()){
            ApiSingleResponse<Boolean> response=httpResult.getDataObjectByJson(new TypeReference<ApiSingleResponse<Boolean>>(){});
            return response;
        }
        return ApiSingleResponse.buildFailure();
    }


    /**
     *  成绩管理成绩修改
     */
    public ApiSingleResponse<Boolean> updatePhysicalTestSingleResultHistory(UpdatePhysicalTestSingleResultHistoryReq request, String sid, String did, String uid){
        Map<String, String> params = getStringStringMap(request, sid, did, uid);
        HttpResult httpResult=HttpClientUtils.post(xunFeiAppConfig.getUrl()+"/physical/test/single/result/history/update",params);
        if(httpResult.isSuccess()){
            ApiSingleResponse<Boolean> response=httpResult.getDataObjectByJson(new TypeReference<ApiSingleResponse<Boolean>>(){});
            return response;
        }
        return ApiSingleResponse.buildFailure();
    }


    /**
     * 导出班级成绩
     */
    public ApiListResponse<PhysicalTestExportClassResp> getPhysicalTestExportClass (QueryPhysicalTestExportClassReq request, String sid, String did, String uid){
        Map<String, String> params = getStringStringMap(request, sid, did, uid);
        Header[] headers=new Header[]{
                new BasicHeader("Content-Encoding","gzip")
        };
        HttpResult httpResult=HttpClientUtils.get(xunFeiAppConfig.getUrl()+"/physical/test/export/class",params,headers,null,6000,6000);
        if(httpResult.isSuccess()){
            ApiListResponse<PhysicalTestExportClassResp> response=httpResult.getDataObjectByJson(new TypeReference<ApiListResponse<PhysicalTestExportClassResp>>(){});
            return response;
        }
        return ApiListResponse.buildFailure();
    }

    /**
     * 导出学生个人成绩
     */
    public ApiListResponse<PhysicalTestExportStudentResp> getPhysicalTestExportStudent (QueryPhysicalTestExportStudentReq request, String sid, String did, String uid){
        Map<String, String> params = getStringStringMap(request, sid, did, uid);
        Header[] headers=new Header[]{
                new BasicHeader("Content-Encoding","gzip")
        };

        HttpResult httpResult=HttpClientUtils.get(xunFeiAppConfig.getUrl()+"/physical/test/export/student",params,headers,null,6000,6000);
        if(httpResult.isSuccess()){
            ApiListResponse<PhysicalTestExportStudentResp> response=httpResult.getDataObjectByJson(new TypeReference<ApiListResponse<PhysicalTestExportStudentResp>>(){});
            return response;
        }
        return ApiListResponse.buildFailure();
    }



    /**
     * 导出班级整体成绩
     */
    public ApiListResponse<PhysicalTestDownloadResp> getPhysicalTestDownload (QueryPhysicalTestDownReq request, String sid, String did, String uid){
        Map<String, String> params = getStringStringMap(request, sid, did, uid);
        Header[] headers=new Header[]{
                new BasicHeader("Content-Encoding","gzip")
        };
        HttpResult httpResult=HttpClientUtils.get(xunFeiAppConfig.getUrl()+"/physical/test/download",params,headers,null,6000,6000);
        if(httpResult.isSuccess()){
            ApiListResponse<PhysicalTestDownloadResp> response=httpResult.getDataObjectByJson(new TypeReference<ApiListResponse<PhysicalTestDownloadResp>>(){});
            return response;
        }
        return ApiListResponse.buildFailure();
    }


    public static void main(String[] args) {
        XunFeiTeachTestApiService xunFeiTeachTestApiService=new XunFeiTeachTestApiService();
//        QueryPhysicalTestAllOverallReq queryPhysicalTestAllOverallReq=new QueryPhysicalTestAllOverallReq();
//        queryPhysicalTestAllOverallReq.setCampusId("1");
//        queryPhysicalTestAllOverallReq.setClassType(0);
//        queryPhysicalTestAllOverallReq.setSportCycleId("cycle-2021-2022");
//        queryPhysicalTestAllOverallReq.setSectionId("xd1");
//        queryPhysicalTestAllOverallReq.setNj("1");
        //System.out.println(xunFeiTeachTestApiService.getPhysicalTestAllOverall(queryPhysicalTestAllOverallReq,"87", null,"3"));

//        QueryPhysicalTestAllAdditionReq queryPhysicalTestAllAdditionReq=new QueryPhysicalTestAllAdditionReq();
//        queryPhysicalTestAllAdditionReq.setCampusId("1");
//        queryPhysicalTestAllAdditionReq.setClassType(0);
//        queryPhysicalTestAllAdditionReq.setSportCycleId("cycle-2021-2022");
//        queryPhysicalTestAllAdditionReq.setSectionId("xd1");
//        queryPhysicalTestAllAdditionReq.setNj("1");
//        queryPhysicalTestAllAdditionReq.setPage(1);
//        queryPhysicalTestAllAdditionReq.setLimit(2);
//        System.out.println(xunFeiTeachTestApiService.getPhysicalTestAllAddition(queryPhysicalTestAllAdditionReq,"87", null,"3"));

        //        QueryPhysicalTestOverallReq req=new QueryPhysicalTestOverallReq();
//        req.setClassId("1");
//        req.setSportCycleId("cycle-2021-2022");
//        req.setSportItemId("1");
//        System.out.println(xunFeiTeachTestApiService.getPhysicalTestOverall(req,"87", null,"3"));

//        QueryPhysicalTestStudentReq req=new QueryPhysicalTestStudentReq();
//        req.setClassId("1");
//        req.setSportCycleId("cycle-2021-2022");
//        req.setSportItemId("1");
//        req.setStudentId("1");
//        System.out.println(xunFeiTeachTestApiService.getPhysicalTestStudent(req,"87", null,"3"));


//        QueryPhysicalTestAllDetailReq queryPhysicalTestAllDetailReq=new QueryPhysicalTestAllDetailReq();
//        queryPhysicalTestAllDetailReq.setCampusId("1");
//        queryPhysicalTestAllDetailReq.setCampusName("111");
//        queryPhysicalTestAllDetailReq.setClassType(0);
//        queryPhysicalTestAllDetailReq.setSportCycleId("cycle-2021-2022");
//        queryPhysicalTestAllDetailReq.setSectionId("xd1");
//        queryPhysicalTestAllDetailReq.setNj("1");
//        queryPhysicalTestAllDetailReq.setSportItemId("1");
//        queryPhysicalTestAllDetailReq.setPage(1);
//        queryPhysicalTestAllDetailReq.setLimit(1);
//        System.out.println(xunFeiTeachTestApiService.getPhysicalTestAllDetail(queryPhysicalTestAllDetailReq,"87", null,"3"));
//




//        QueryPhysicalTestAllAnalyzeReq queryPhysicalTestAllAnalyzeReq=new QueryPhysicalTestAllAnalyzeReq();
//        queryPhysicalTestAllAnalyzeReq.setCampusId("1");
//        queryPhysicalTestAllAnalyzeReq.setClassType(0);
//        queryPhysicalTestAllAnalyzeReq.setSportCycleId("cycle-2021-2022");
//        queryPhysicalTestAllAnalyzeReq.setQueryType("3");
//        queryPhysicalTestAllAnalyzeReq.setPage(5);
//        queryPhysicalTestAllAnalyzeReq.setLimit(2);
//        System.out.println(xunFeiTeachTestApiService.getPhysicalTestAllAnalyze(queryPhysicalTestAllAnalyzeReq,"87", null,"3"));

//        QueryPhysicalTestSingleOverallReq queryPhysicalTestSingleOverallReq=new QueryPhysicalTestSingleOverallReq();
//        queryPhysicalTestSingleOverallReq.setCampusId("1");
//        queryPhysicalTestSingleOverallReq.setClassType(0);
//        queryPhysicalTestSingleOverallReq.setSportCycleId("cycle-2021-2022");
//        queryPhysicalTestSingleOverallReq.setSportItemId("2");
//        System.out.println(xunFeiTeachTestApiService.getPhysicalTestSingleOverall(queryPhysicalTestSingleOverallReq,"87", null,"3"));
        //System.out.println(xunFeiTeachTestApiService.getPhysicalTestSingleAnalyze(queryPhysicalTestSingleOverallReq,"87", null,"3"));


//        QueryPhysicalTestSingleDetailReq queryPhysicalTestSingleDetailReq=new QueryPhysicalTestSingleDetailReq();
//        queryPhysicalTestSingleDetailReq.setCampusId("1");
//        queryPhysicalTestSingleDetailReq.setClassType(0);
//        queryPhysicalTestSingleDetailReq.setSportCycleId("cycle-2021-2022");
//        queryPhysicalTestSingleDetailReq.setSportItemId("1");
//        queryPhysicalTestSingleDetailReq.setPage(1);
//        queryPhysicalTestSingleDetailReq.setLimit(1);
//        System.out.println(xunFeiTeachTestApiService.getPhysicalTestSingleDetail(queryPhysicalTestSingleDetailReq,"87", null,"3"));


//        QueryPhysicalTestSingleUserDetailReq queryPhysicalTestSingleUserDetailReq=new QueryPhysicalTestSingleUserDetailReq();
//        queryPhysicalTestSingleUserDetailReq.setStudentId("3");
//        queryPhysicalTestSingleUserDetailReq.setClassType(0);
//        queryPhysicalTestSingleUserDetailReq.setSportCycleId("cycle-2021-2022");
//        queryPhysicalTestSingleUserDetailReq.setSportItemId("1");
//        System.out.println(xunFeiTeachTestApiService.getPhysicalTestSingleUserDetail(queryPhysicalTestSingleUserDetailReq,"87", null,"3"));

//        QueryPhysicalTestAllResultManagerReq queryPhysicalTestAllResultManagerReq=new QueryPhysicalTestAllResultManagerReq();
//        queryPhysicalTestAllResultManagerReq.setCampusId("1");
//        queryPhysicalTestAllResultManagerReq.setClassType(0);
//        queryPhysicalTestAllResultManagerReq.setSportCycleId("cycle-2021-2022");
//        queryPhysicalTestAllResultManagerReq.setSportItemId("1");
//        queryPhysicalTestAllResultManagerReq.setSectionId("xd1");
//        queryPhysicalTestAllResultManagerReq.setNj("1");
//        queryPhysicalTestAllResultManagerReq.setClassId("1");
//        queryPhysicalTestAllResultManagerReq.setPage(1);
//        queryPhysicalTestAllResultManagerReq.setLimit(10);
//        System.out.println(xunFeiTeachTestApiService.getPhysicalTestSingleResultManager(queryPhysicalTestAllResultManagerReq,"87", null,"3"));

//        QueryPhysicalTestAllResultManagerReq queryPhysicalTestAllResultManagerReq=new QueryPhysicalTestAllResultManagerReq();
//        queryPhysicalTestAllResultManagerReq.setCampusId("1");
//        queryPhysicalTestAllResultManagerReq.setClassType(0);
//        queryPhysicalTestAllResultManagerReq.setSportCycleId("cycle-2021-2022");
//        queryPhysicalTestAllResultManagerReq.setSectionId("xd1");
//        queryPhysicalTestAllResultManagerReq.setNj("1");
//        queryPhysicalTestAllResultManagerReq.setClassId("1");
//        queryPhysicalTestAllResultManagerReq.setPage(1);
//        queryPhysicalTestAllResultManagerReq.setLimit(10);
//        System.out.println(xunFeiTeachTestApiService.getPhysicalTestAllResultManager(queryPhysicalTestAllResultManagerReq,"87", null,"3"));

//

//        QueryPhysicalTestAllResultDetailReq queryPhysicalTestAllResultDetailReq=new QueryPhysicalTestAllResultDetailReq();
//        queryPhysicalTestAllResultDetailReq.setStudentId("1");
//        queryPhysicalTestAllResultDetailReq.setSportCycleId("cycle-2021-2022");
//        System.out.println(xunFeiTeachTestApiService.getPhysicalTestAllResultDetail(queryPhysicalTestAllResultDetailReq,"87", null,"3"));


//        QueryPhysicalTestSingleResultHistoryReq queryPhysicalTestSingleResultHistoryReq=new QueryPhysicalTestSingleResultHistoryReq();
//        queryPhysicalTestSingleResultHistoryReq.setStudentId("2");
//        queryPhysicalTestSingleResultHistoryReq.setSportCycleId("cycle-2021-2022");
//        queryPhysicalTestSingleResultHistoryReq.setSportItemId("1");
//        System.out.println(xunFeiTeachTestApiService.getPhysicalTestSingleResultHistory(queryPhysicalTestSingleResultHistoryReq,"87", null,"3"));

       // System.out.println(xunFeiTeachTestApiService.getPhysicalTestSingleResultHistoryDelete(queryPhysicalTestSingleResultHistoryReq,"87", null,"3"));


//        UpdatePhysicalTestSingleResultHistoryReq updatePhysicalTestSingleResultHistoryReq=new UpdatePhysicalTestSingleResultHistoryReq();
//        updatePhysicalTestSingleResultHistoryReq.setStudentId("1");
//        updatePhysicalTestSingleResultHistoryReq.setSportCycleId("cycle-2021-2022");
//        updatePhysicalTestSingleResultHistoryReq.setSportItemId("1");
//        updatePhysicalTestSingleResultHistoryReq.setMark("22");
//        System.out.println(xunFeiTeachTestApiService.updatePhysicalTestSingleResultHistory(updatePhysicalTestSingleResultHistoryReq,"87", null,"3"));


//        QueryPhysicalTestExportStudentReq queryPhysicalTestExportStudentReq=new QueryPhysicalTestExportStudentReq();
//        queryPhysicalTestExportStudentReq.setXh("C200101");
//        List<String> sportCycleIdList=new ArrayList<>();
//        sportCycleIdList.add("cycle-2021-2022");
//        List<String>  sportItemIdList=new ArrayList<>();
//        sportItemIdList.add("zf");
//        sportItemIdList.add("1");
//        queryPhysicalTestExportStudentReq.setSportCycleIdList(sportCycleIdList.stream().collect(Collectors.joining(",")));
//        queryPhysicalTestExportStudentReq.setSportItemIdList(sportItemIdList.stream().collect(Collectors.joining(",")));
//        System.out.println(xunFeiTeachTestApiService.getPhysicalTestExportStudent(queryPhysicalTestExportStudentReq,"159", null,"3"));


//
        QueryPhysicalTestExportClassReq queryPhysicalTestExportStudentReq=new QueryPhysicalTestExportClassReq();
        queryPhysicalTestExportStudentReq.setCampusId("23");
        queryPhysicalTestExportStudentReq.setClassType(0);
        List<String> sportCycleIdList=new ArrayList<>();
        sportCycleIdList.add("cycle-2021-2022");
        List<String>  sportItemIdList=new ArrayList<>();
        sportItemIdList.add("zf");
        sportItemIdList.add("1");
        List<String>  classIdList=new ArrayList<>();
        classIdList.add("68");
        classIdList.add("69");

        queryPhysicalTestExportStudentReq.setClassIdList(classIdList.stream().collect(Collectors.joining(",")));
        queryPhysicalTestExportStudentReq.setSportCycleIdList(sportCycleIdList.stream().collect(Collectors.joining(",")));
        queryPhysicalTestExportStudentReq.setSportItemIdList(sportItemIdList.stream().collect(Collectors.joining(",")));
        System.out.println(xunFeiTeachTestApiService.getPhysicalTestExportClass(queryPhysicalTestExportStudentReq,"159", null,"3"));




//        QueryPhysicalTestDownReq queryPhysicalTestDownReq=new QueryPhysicalTestDownReq();
//        queryPhysicalTestDownReq.setCampusId("23");
//        queryPhysicalTestDownReq.setSportCycleId("cycle-2021-2022");
//        System.out.println(xunFeiTeachTestApiService.getPhysicalTestDownload(queryPhysicalTestDownReq,"159", null,"3"));

    }
}

